package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Admin;
import com.springboot.astra.mapper.AdminMapper;
import com.springboot.astra.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin getOneById(Integer id) {
        return adminMapper.getOneById(id);
    }

    @Override
    public List<Admin> getAll() {
        return adminMapper.getAll();
    }

    @Override
    public void insertAdmin(Admin admin) {
        adminMapper.insertAdmin(admin);
    }

    @Override
    public void updateOneById(Admin admin) {
        adminMapper.updateOneById(admin);
    }

    @Override
    public void deleteOneById(Admin admin) {
        adminMapper.deleteOneById(admin);
    }
}
